<?php $this->load->view(TEMPLATE_NAME.'/front/header'); ?>
<?php $this->load->view(TEMPLATE_NAME.'/front/login_left'); ?>
<script type="text/javascript" src="<?php echo base_url()?>js/jquery.validate.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var result_email = true;
	$.validator.addMethod("emailCheck", function(val, elem) {                                                
        $.post("<?php echo site_url('json_request/check_directory_email')?>" ,{
             email: $('#email').val()                                  
        },function(data){
            result_email = (data=="TRUE") ? true : false;
        }, "json");
        return result_email;
    });
    
    $("#signup_form").validate({
    	onkeyup: false,                 
        rules: {            
            email: {                
                required : true,                
                email : true,
                emailCheck: true            
            },
            re_email: {         
                equalTo: "#email"            
            },
            password: {
                required : true,                
                minlength: 6            
            },
            re_password: {                
                equalTo: "#password"            
            }                        
                    
        },        
        messages: {           
            email: {                
                required : "Please input your e-mail address",                
                email : "Please input a valid e-mail address",
                emailCheck : "The e-mail address already exists in the database"            
            },
            re_email: {            
                equalTo: "E-mail address does not match"            
            },
            password: {
                required : "Please input your password",                
                minlength: "Please input a password of more than 6 characters"            
            },
            re_password: {                
                equalTo: "Password does not match"            
            }
        }          
      });
});
</script>
<div class="page">
<h2>login error</h2>

<p class="f15 purple" style="font-weight:bold;"><img height="42" width="40" class="tick" src="<?php echo site_url();?>images/cancel_icon.png" alt=""></p>		
<div class="tick_div">
	<p class="yellow_txt"><?php echo (!empty($error_directory)?$error_directory:validation_errors());?></p>
</div>
<div class="clear"></div>


<hr />
<?php if($error_directory == "sorry wrong password."){?>
<p class="normal_text4">Please re-enter the correct password</p>
<?php }else{?>
<p class="normal_text4">Please try again or <span style="color:#CF118C;"<?php echo anchor('directory/advertise','Sign up now!'); ?></p>
<?php }?>


</div>
<?php $this->load->view(TEMPLATE_NAME.'/front/side_right'); ?>
<?php $this->load->view(TEMPLATE_NAME.'/front/footer'); ?>

